package com.proton.carepatchtemp.database;

import com.proton.carepatchtemp.database.dao.AssistInfo;
import com.proton.carepatchtemp.utils.SpUtils;


/**
 * Created by Api on 2016/9/22.
 */

//AssistInfo信息传入SharePferenceres
public class SpAssist {
    public final static String ASSIST_INFO = "assist_info";
    public static AssistInfo mAssistInfo = null;

    public static AssistInfo getAssistInfo() {
        if (null == mAssistInfo) {
            mAssistInfo = (AssistInfo) SpUtils.getObj(ASSIST_INFO);
        }
        if (null == mAssistInfo) {
            return new AssistInfo();
        }
        return mAssistInfo;
    }

    public static void setAssistInfo(AssistInfo info) {
        mAssistInfo = info;
        SpUtils.saveObj(ASSIST_INFO, info);
    }
}
